
#ifndef _EEPROMSAVE_H
#define _EEPROMSAVE_H

#include "stm8l15x_flash.h"

#define DYNAMIC_PARA_EEPROM_START_ADDRESS (FLASH_DATA_EEPROM_START_PHYSICAL_ADDRESS + 10)
#define DYNAMIC_PARA_EEPROM_START_ADDRESS_BACKUP (FLASH_DATA_EEPROM_START_PHYSICAL_ADDRESS + 100) 
#define FACTORY_PARA_EEPROM_START_ADDRESS (FLASH_DATA_EEPROM_START_PHYSICAL_ADDRESS + 200)
#define ENCRYPTION_PARA_EEPROM_START_ADDRESS (FLASH_DATA_EEPROM_START_PHYSICAL_ADDRESS + 300)
#define WIRELESS_PARA_EEPROM_START_ADDRESS (FLASH_DATA_EEPROM_START_PHYSICAL_ADDRESS + 400)

void SaveDataToEEPROM(unsigned long int startAddr,const unsigned char *sdat,unsigned short int len);
void ReadDataFromEEPROM(unsigned long int startAddr,unsigned char *sdat,unsigned short int len);

#endif
